<?php











namespace Composer;

use Composer\Autoload\ClassLoader;
use Composer\Semver\VersionParser;








class InstalledVersions
{
private static $installed = array (
  'root' => 
  array (
    'pretty_version' => '1.0.0+no-version-set',
    'version' => '1.0.0.0',
    'aliases' => 
    array (
    ),
    'reference' => NULL,
    'name' => 'workerman/webman',
  ),
  'versions' => 
  array (
    'brick/math' => 
    array (
      'pretty_version' => '0.12.3',
      'version' => '0.12.3.0',
      'aliases' => 
      array (
      ),
      'reference' => '866551da34e9a618e64a819ee1e01c20d8a588ba',
    ),
    'carbonphp/carbon-doctrine-types' => 
    array (
      'pretty_version' => '2.1.0',
      'version' => '2.1.0.0',
      'aliases' => 
      array (
      ),
      'reference' => '99f76ffa36cce3b70a4a6abce41dba15ca2e84cb',
    ),
    'doctrine/inflector' => 
    array (
      'pretty_version' => '2.0.10',
      'version' => '2.0.10.0',
      'aliases' => 
      array (
      ),
      'reference' => '5817d0659c5b50c9b950feb9af7b9668e2c436bc',
    ),
    'fruitcake/php-cors' => 
    array (
      'pretty_version' => 'v1.3.0',
      'version' => '1.3.0.0',
      'aliases' => 
      array (
      ),
      'reference' => '3d158f36e7875e2f040f37bc0573956240a5a38b',
    ),
    'guzzlehttp/guzzle' => 
    array (
      'pretty_version' => '7.9.3',
      'version' => '7.9.3.0',
      'aliases' => 
      array (
      ),
      'reference' => '7b2f29fe81dc4da0ca0ea7d42107a0845946ea77',
    ),
    'guzzlehttp/promises' => 
    array (
      'pretty_version' => '2.2.0',
      'version' => '2.2.0.0',
      'aliases' => 
      array (
      ),
      'reference' => '7c69f28996b0a6920945dd20b3857e499d9ca96c',
    ),
    'guzzlehttp/psr7' => 
    array (
      'pretty_version' => '2.7.1',
      'version' => '2.7.1.0',
      'aliases' => 
      array (
      ),
      'reference' => 'c2270caaabe631b3b44c85f99e5a04bbb8060d16',
    ),
    'guzzlehttp/uri-template' => 
    array (
      'pretty_version' => 'v1.0.4',
      'version' => '1.0.4.0',
      'aliases' => 
      array (
      ),
      'reference' => '30e286560c137526eccd4ce21b2de477ab0676d2',
    ),
    'illuminate/bus' => 
    array (
      'pretty_version' => 'v10.48.28',
      'version' => '10.48.28.0',
      'aliases' => 
      array (
      ),
      'reference' => 'c66d57011eec385055e1426d026c270aeecb05aa',
    ),
    'illuminate/collections' => 
    array (
      'pretty_version' => 'v10.48.28',
      'version' => '10.48.28.0',
      'aliases' => 
      array (
      ),
      'reference' => '48de3d6bc6aa779112ddcb608a3a96fc975d89d8',
    ),
    'illuminate/conditionable' => 
    array (
      'pretty_version' => 'v10.48.28',
      'version' => '10.48.28.0',
      'aliases' => 
      array (
      ),
      'reference' => '3ee34ac306fafc2a6f19cd7cd68c9af389e432a5',
    ),
    'illuminate/container' => 
    array (
      'pretty_version' => 'v10.48.28',
      'version' => '10.48.28.0',
      'aliases' => 
      array (
      ),
      'reference' => 'ed6253f7dd3a67d468b2cc7a69a657e1f14c7ba3',
    ),
    'illuminate/contracts' => 
    array (
      'pretty_version' => 'v10.48.28',
      'version' => '10.48.28.0',
      'aliases' => 
      array (
      ),
      'reference' => 'f90663a69f926105a70b78060a31f3c64e2d1c74',
    ),
    'illuminate/database' => 
    array (
      'pretty_version' => 'v10.48.28',
      'version' => '10.48.28.0',
      'aliases' => 
      array (
      ),
      'reference' => '2246a636ba1f1e0cc6a5711f0e3929c6c303d937',
    ),
    'illuminate/events' => 
    array (
      'pretty_version' => 'v10.48.28',
      'version' => '10.48.28.0',
      'aliases' => 
      array (
      ),
      'reference' => '3edcdad2f2fe6da6802afb0a256b0f7ee00d72e9',
    ),
    'illuminate/filesystem' => 
    array (
      'pretty_version' => 'v10.48.28',
      'version' => '10.48.28.0',
      'aliases' => 
      array (
      ),
      'reference' => '584ff4da2218e63e7210bba1c541ce526f24f37e',
    ),
    'illuminate/http' => 
    array (
      'pretty_version' => 'v10.48.28',
      'version' => '10.48.28.0',
      'aliases' => 
      array (
      ),
      'reference' => '71a34c9779765007906ace63096bbcbf0bd6d6a5',
    ),
    'illuminate/macroable' => 
    array (
      'pretty_version' => 'v10.48.28',
      'version' => '10.48.28.0',
      'aliases' => 
      array (
      ),
      'reference' => 'dff667a46ac37b634dcf68909d9d41e94dc97c27',
    ),
    'illuminate/pagination' => 
    array (
      'pretty_version' => 'v10.48.28',
      'version' => '10.48.28.0',
      'aliases' => 
      array (
      ),
      'reference' => '616874b9607ff35925347e1710a8b5151858cdf2',
    ),
    'illuminate/pipeline' => 
    array (
      'pretty_version' => 'v10.48.28',
      'version' => '10.48.28.0',
      'aliases' => 
      array (
      ),
      'reference' => '3030a131e5e9cb18c9a826428fcffc076df9dcd7',
    ),
    'illuminate/session' => 
    array (
      'pretty_version' => 'v10.48.28',
      'version' => '10.48.28.0',
      'aliases' => 
      array (
      ),
      'reference' => 'c607dff2f3288ceaf16ed7215e193ffa6495ee3c',
    ),
    'illuminate/support' => 
    array (
      'pretty_version' => 'v10.48.28',
      'version' => '10.48.28.0',
      'aliases' => 
      array (
      ),
      'reference' => '6d09b480d34846245d9288f4dcefb17a73ce6e6a',
    ),
    'intervention/image' => 
    array (
      'pretty_version' => '2.7.2',
      'version' => '2.7.2.0',
      'aliases' => 
      array (
      ),
      'reference' => '04be355f8d6734c826045d02a1079ad658322dad',
    ),
    'laravel/serializable-closure' => 
    array (
      'pretty_version' => 'v1.3.7',
      'version' => '1.3.7.0',
      'aliases' => 
      array (
      ),
      'reference' => '4f48ade902b94323ca3be7646db16209ec76be3d',
    ),
    'monolog/monolog' => 
    array (
      'pretty_version' => '2.10.0',
      'version' => '2.10.0.0',
      'aliases' => 
      array (
      ),
      'reference' => '5cf826f2991858b54d5c3809bee745560a1042a7',
    ),
    'nesbot/carbon' => 
    array (
      'pretty_version' => '2.73.0',
      'version' => '2.73.0.0',
      'aliases' => 
      array (
      ),
      'reference' => '9228ce90e1035ff2f0db84b40ec2e023ed802075',
    ),
    'nikic/fast-route' => 
    array (
      'pretty_version' => 'v1.3.0',
      'version' => '1.3.0.0',
      'aliases' => 
      array (
      ),
      'reference' => '181d480e08d9476e61381e04a71b34dc0432e812',
    ),
    'psr/clock' => 
    array (
      'pretty_version' => '1.0.0',
      'version' => '1.0.0.0',
      'aliases' => 
      array (
      ),
      'reference' => 'e41a24703d4560fd0acb709162f73b8adfc3aa0d',
    ),
    'psr/clock-implementation' => 
    array (
      'provided' => 
      array (
        0 => '1.0',
      ),
    ),
    'psr/container' => 
    array (
      'pretty_version' => '2.0.2',
      'version' => '2.0.2.0',
      'aliases' => 
      array (
      ),
      'reference' => 'c71ecc56dfe541dbd90c5360474fbc405f8d5963',
    ),
    'psr/container-implementation' => 
    array (
      'provided' => 
      array (
        0 => '1.1|2.0',
      ),
    ),
    'psr/event-dispatcher' => 
    array (
      'pretty_version' => '1.0.0',
      'version' => '1.0.0.0',
      'aliases' => 
      array (
      ),
      'reference' => 'dbefd12671e8a14ec7f180cab83036ed26714bb0',
    ),
    'psr/event-dispatcher-implementation' => 
    array (
      'provided' => 
      array (
        0 => '1.0',
      ),
    ),
    'psr/http-client' => 
    array (
      'pretty_version' => '1.0.3',
      'version' => '1.0.3.0',
      'aliases' => 
      array (
      ),
      'reference' => 'bb5906edc1c324c9a05aa0873d40117941e5fa90',
    ),
    'psr/http-client-implementation' => 
    array (
      'provided' => 
      array (
        0 => '1.0',
      ),
    ),
    'psr/http-factory' => 
    array (
      'pretty_version' => '1.1.0',
      'version' => '1.1.0.0',
      'aliases' => 
      array (
      ),
      'reference' => '2b4765fddfe3b508ac62f829e852b1501d3f6e8a',
    ),
    'psr/http-factory-implementation' => 
    array (
      'provided' => 
      array (
        0 => '1.0',
      ),
    ),
    'psr/http-message' => 
    array (
      'pretty_version' => '2.0',
      'version' => '2.0.0.0',
      'aliases' => 
      array (
      ),
      'reference' => '402d35bcb92c70c026d1a6a9883f06b2ead23d71',
    ),
    'psr/http-message-implementation' => 
    array (
      'provided' => 
      array (
        0 => '1.0',
      ),
    ),
    'psr/log' => 
    array (
      'pretty_version' => '3.0.2',
      'version' => '3.0.2.0',
      'aliases' => 
      array (
      ),
      'reference' => 'f16e1d5863e37f8d8c2a01719f5b34baa2b714d3',
    ),
    'psr/log-implementation' => 
    array (
      'provided' => 
      array (
        0 => '1.0.0 || 2.0.0 || 3.0.0',
        1 => '1.0|2.0|3.0',
      ),
    ),
    'psr/simple-cache' => 
    array (
      'pretty_version' => '3.0.0',
      'version' => '3.0.0.0',
      'aliases' => 
      array (
      ),
      'reference' => '764e0b3939f5ca87cb904f570ef9be2d78a07865',
    ),
    'ralouphie/getallheaders' => 
    array (
      'pretty_version' => '3.0.3',
      'version' => '3.0.3.0',
      'aliases' => 
      array (
      ),
      'reference' => '120b605dfeb996808c31b6477290a714d356e822',
    ),
    'symfony/deprecation-contracts' => 
    array (
      'pretty_version' => 'v3.5.1',
      'version' => '3.5.1.0',
      'aliases' => 
      array (
      ),
      'reference' => '74c71c939a79f7d5bf3c1ce9f5ea37ba0114c6f6',
    ),
    'symfony/error-handler' => 
    array (
      'pretty_version' => 'v6.4.20',
      'version' => '6.4.20.0',
      'aliases' => 
      array (
      ),
      'reference' => 'aa3bcf4f7674719df078e61cc8062e5b7f752031',
    ),
    'symfony/event-dispatcher' => 
    array (
      'pretty_version' => 'v6.4.13',
      'version' => '6.4.13.0',
      'aliases' => 
      array (
      ),
      'reference' => '0ffc48080ab3e9132ea74ef4e09d8dcf26bf897e',
    ),
    'symfony/event-dispatcher-contracts' => 
    array (
      'pretty_version' => 'v3.5.1',
      'version' => '3.5.1.0',
      'aliases' => 
      array (
      ),
      'reference' => '7642f5e970b672283b7823222ae8ef8bbc160b9f',
    ),
    'symfony/event-dispatcher-implementation' => 
    array (
      'provided' => 
      array (
        0 => '2.0|3.0',
      ),
    ),
    'symfony/finder' => 
    array (
      'pretty_version' => 'v6.4.17',
      'version' => '6.4.17.0',
      'aliases' => 
      array (
      ),
      'reference' => '1d0e8266248c5d9ab6a87e3789e6dc482af3c9c7',
    ),
    'symfony/http-foundation' => 
    array (
      'pretty_version' => 'v6.4.21',
      'version' => '6.4.21.0',
      'aliases' => 
      array (
      ),
      'reference' => '3f0c7ea41db479383b81d436b836d37168fd5b99',
    ),
    'symfony/http-kernel' => 
    array (
      'pretty_version' => 'v6.4.21',
      'version' => '6.4.21.0',
      'aliases' => 
      array (
      ),
      'reference' => '983ca05eec6623920d24ec0f1005f487d3734a0c',
    ),
    'symfony/mime' => 
    array (
      'pretty_version' => 'v6.4.21',
      'version' => '6.4.21.0',
      'aliases' => 
      array (
      ),
      'reference' => 'fec8aa5231f3904754955fad33c2db50594d22d1',
    ),
    'symfony/polyfill-ctype' => 
    array (
      'pretty_version' => 'v1.32.0',
      'version' => '1.32.0.0',
      'aliases' => 
      array (
      ),
      'reference' => 'a3cc8b044a6ea513310cbd48ef7333b384945638',
    ),
    'symfony/polyfill-intl-idn' => 
    array (
      'pretty_version' => 'v1.32.0',
      'version' => '1.32.0.0',
      'aliases' => 
      array (
      ),
      'reference' => '9614ac4d8061dc257ecc64cba1b140873dce8ad3',
    ),
    'symfony/polyfill-intl-normalizer' => 
    array (
      'pretty_version' => 'v1.32.0',
      'version' => '1.32.0.0',
      'aliases' => 
      array (
      ),
      'reference' => '3833d7255cc303546435cb650316bff708a1c75c',
    ),
    'symfony/polyfill-mbstring' => 
    array (
      'pretty_version' => 'v1.32.0',
      'version' => '1.32.0.0',
      'aliases' => 
      array (
      ),
      'reference' => '6d857f4d76bd4b343eac26d6b539585d2bc56493',
    ),
    'symfony/polyfill-php80' => 
    array (
      'pretty_version' => 'v1.32.0',
      'version' => '1.32.0.0',
      'aliases' => 
      array (
      ),
      'reference' => '0cc9dd0f17f61d8131e7df6b84bd344899fe2608',
    ),
    'symfony/polyfill-php83' => 
    array (
      'pretty_version' => 'v1.32.0',
      'version' => '1.32.0.0',
      'aliases' => 
      array (
      ),
      'reference' => '2fb86d65e2d424369ad2905e83b236a8805ba491',
    ),
    'symfony/translation' => 
    array (
      'pretty_version' => 'v6.4.21',
      'version' => '6.4.21.0',
      'aliases' => 
      array (
      ),
      'reference' => 'bb92ea5588396b319ba43283a5a3087a034cb29c',
    ),
    'symfony/translation-contracts' => 
    array (
      'pretty_version' => 'v3.5.1',
      'version' => '3.5.1.0',
      'aliases' => 
      array (
      ),
      'reference' => '4667ff3bd513750603a09c8dedbea942487fb07c',
    ),
    'symfony/translation-implementation' => 
    array (
      'provided' => 
      array (
        0 => '2.3|3.0',
      ),
    ),
    'symfony/var-dumper' => 
    array (
      'pretty_version' => 'v6.4.21',
      'version' => '6.4.21.0',
      'aliases' => 
      array (
      ),
      'reference' => '22560f80c0c5cd58cc0bcaf73455ffd81eb380d5',
    ),
    'voku/portable-ascii' => 
    array (
      'pretty_version' => '2.0.3',
      'version' => '2.0.3.0',
      'aliases' => 
      array (
      ),
      'reference' => 'b1d923f88091c6bf09699efcd7c8a1b1bfd7351d',
    ),
    'webman/admin' => 
    array (
      'pretty_version' => 'v2.1.7',
      'version' => '2.1.7.0',
      'aliases' => 
      array (
      ),
      'reference' => '44a6158fbac2475edca92d3fc0108221a93373b5',
    ),
    'webman/captcha' => 
    array (
      'pretty_version' => 'v1.0.5',
      'version' => '1.0.5.0',
      'aliases' => 
      array (
      ),
      'reference' => '0b2645b813466e4e70bff311511364080bad2ec5',
    ),
    'webman/database' => 
    array (
      'pretty_version' => 'v2.1.6',
      'version' => '2.1.6.0',
      'aliases' => 
      array (
      ),
      'reference' => '943c5a0f92d8959d9160c2ee3925112b15c308c8',
    ),
    'webman/event' => 
    array (
      'pretty_version' => 'v1.0.5',
      'version' => '1.0.5.0',
      'aliases' => 
      array (
      ),
      'reference' => 'b1c3f6b70fd290e48288703d59bead0e28f9fb84',
    ),
    'workerman/coroutine' => 
    array (
      'pretty_version' => 'v1.1.3',
      'version' => '1.1.3.0',
      'aliases' => 
      array (
      ),
      'reference' => 'df8fc428967d512a74a8a7d80355c1d40228c9fa',
    ),
    'workerman/webman' => 
    array (
      'pretty_version' => '1.0.0+no-version-set',
      'version' => '1.0.0.0',
      'aliases' => 
      array (
      ),
      'reference' => NULL,
    ),
    'workerman/webman-framework' => 
    array (
      'pretty_version' => 'v2.1.2',
      'version' => '2.1.2.0',
      'aliases' => 
      array (
      ),
      'reference' => 'f803bd867f07bb0929faef060b59a19a44186bfc',
    ),
    'workerman/workerman' => 
    array (
      'pretty_version' => 'v5.1.1',
      'version' => '5.1.1.0',
      'aliases' => 
      array (
      ),
      'reference' => '72cafa19e488896abd2576ea67b3b1af1abf71c0',
    ),
  ),
);
private static $canGetVendors;
private static $installedByVendor = array();







public static function getInstalledPackages()
{
$packages = array();
foreach (self::getInstalled() as $installed) {
$packages[] = array_keys($installed['versions']);
}

if (1 === \count($packages)) {
return $packages[0];
}

return array_keys(array_flip(\call_user_func_array('array_merge', $packages)));
}









public static function isInstalled($packageName)
{
foreach (self::getInstalled() as $installed) {
if (isset($installed['versions'][$packageName])) {
return true;
}
}

return false;
}














public static function satisfies(VersionParser $parser, $packageName, $constraint)
{
$constraint = $parser->parseConstraints($constraint);
$provided = $parser->parseConstraints(self::getVersionRanges($packageName));

return $provided->matches($constraint);
}










public static function getVersionRanges($packageName)
{
foreach (self::getInstalled() as $installed) {
if (!isset($installed['versions'][$packageName])) {
continue;
}

$ranges = array();
if (isset($installed['versions'][$packageName]['pretty_version'])) {
$ranges[] = $installed['versions'][$packageName]['pretty_version'];
}
if (array_key_exists('aliases', $installed['versions'][$packageName])) {
$ranges = array_merge($ranges, $installed['versions'][$packageName]['aliases']);
}
if (array_key_exists('replaced', $installed['versions'][$packageName])) {
$ranges = array_merge($ranges, $installed['versions'][$packageName]['replaced']);
}
if (array_key_exists('provided', $installed['versions'][$packageName])) {
$ranges = array_merge($ranges, $installed['versions'][$packageName]['provided']);
}

return implode(' || ', $ranges);
}

throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
}





public static function getVersion($packageName)
{
foreach (self::getInstalled() as $installed) {
if (!isset($installed['versions'][$packageName])) {
continue;
}

if (!isset($installed['versions'][$packageName]['version'])) {
return null;
}

return $installed['versions'][$packageName]['version'];
}

throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
}





public static function getPrettyVersion($packageName)
{
foreach (self::getInstalled() as $installed) {
if (!isset($installed['versions'][$packageName])) {
continue;
}

if (!isset($installed['versions'][$packageName]['pretty_version'])) {
return null;
}

return $installed['versions'][$packageName]['pretty_version'];
}

throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
}





public static function getReference($packageName)
{
foreach (self::getInstalled() as $installed) {
if (!isset($installed['versions'][$packageName])) {
continue;
}

if (!isset($installed['versions'][$packageName]['reference'])) {
return null;
}

return $installed['versions'][$packageName]['reference'];
}

throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
}





public static function getRootPackage()
{
$installed = self::getInstalled();

return $installed[0]['root'];
}








public static function getRawData()
{
@trigger_error('getRawData only returns the first dataset loaded, which may not be what you expect. Use getAllRawData() instead which returns all datasets for all autoloaders present in the process.', E_USER_DEPRECATED);

return self::$installed;
}







public static function getAllRawData()
{
return self::getInstalled();
}



















public static function reload($data)
{
self::$installed = $data;
self::$installedByVendor = array();
}





private static function getInstalled()
{
if (null === self::$canGetVendors) {
self::$canGetVendors = method_exists('Composer\Autoload\ClassLoader', 'getRegisteredLoaders');
}

$installed = array();

if (self::$canGetVendors) {
foreach (ClassLoader::getRegisteredLoaders() as $vendorDir => $loader) {
if (isset(self::$installedByVendor[$vendorDir])) {
$installed[] = self::$installedByVendor[$vendorDir];
} elseif (is_file($vendorDir.'/composer/installed.php')) {
$installed[] = self::$installedByVendor[$vendorDir] = require $vendorDir.'/composer/installed.php';
}
}
}

$installed[] = self::$installed;

return $installed;
}
}
